<template>
	<view>
		<view class="pages">
		<!-- 导航栏 -->
		<navigation  title="菜单"></navigation>
		 <!-- 选项卡切换 -->
		 <section class="Index-Page">
		   <s-tabs :effect="false" v-model="activeTab" @change="change" :nav-per-view="2">		     
		       <s-tab v-for="(item,index) in menu" :key="index" :title="item.pa_name">
				   <view class="menu" >
				   	  <view class="menu_text" v-for="(items,indexs) in item.pa_details" :key="indexs">
				   	  	   <text>{{items}}</text>
				   	  </view>
					  <view class="overhead">
						<view class="">
							附加信息:
						</view> 
						<view class="">
							<text v-for="(iteml,indexl) in item.pa_information" :key="indexl">{{iteml}}</text>							
						</view>
					  </view>
				   </view>
			   </s-tab>			 			 		    
		   </s-tabs>
		 </section>
	        <!-- <van-tabs :active="0" bind:change="onChange">
	          <van-tab :title="item.pa_name" v-for="(item,index) in menu" :key="index">
				  <view class="menu" >
				  	  <view class="menu_text" v-for="(items,indexs) in item.pa_details" :key="indexs">
				  	  	   <text>{{items}}</text>
				  	  </view>
					  <view class="overhead">
					  	<view class="">
					  		附加信息:
					  	</view> 
						<view class="">
							<text v-for="(iteml,indexl) in item.pa_information" :key="indexl">{{iteml}}</text>							
						</view>
					  </view>
				  </view>
			  </van-tab>
	        </van-tabs> -->
		</view>
	</view>
</template>

<script>
	import sTabs from '@/component/s-tabs';
	import sTab from '@/component/s-tab';
	import navigation from '@/component/navigation.vue'
	const app = getApp().globalData;
	const sun = require('../../../utils/sun.js')
	export default {
		components:{
		   navigation,
		   sTabs,
		   sTab
		},
		data() {
			return {
				activeTab: 0,
				menu:[]
			}
		},
		onLoad(option){
			this.getMenu(option.id)
		},
		methods: {
			//获取数据
			getMenu(id) {
				let that = this
				sun.request({
					url: "mobile/Index/GetMenuOne",
					showLoading: true,
					data: {
						m_id:id,
						// m_id:489
					},
					success(res) {
						
						let data = res
			             if(data.code==200){
					           that.menu=data.data	
						 }
					},
					fail(e) {
						uni.showToast({
							icon: "none",
							title: "服务器开小差去啦~",
						})
					}
				})
			}
		}
	}
</script>

<style>

.menu{
	padding: 56rpx;
	
}
.menu_text{
	text-align: center;
	font-family: PingFang-SC-Regular;
	font-size: 28upx;
	font-weight: normal;
	font-stretch: normal;
	line-height: 42upx;
	letter-spacing: 0upx;
	color: #010101;
}
.overhead{
	padding: 10upx 0;
	    font-family: PingFang-SC-Regular;
		font-size: 24upx;
		font-weight: normal;
		font-stretch: normal;
		line-height: 33upx;
		color: #010101;
		letter-spacing: 0upx;
}
</style>
